package com.heima.apis.wemedia;

import com.heima.model.admin.dtos.ChannelDto;
import com.heima.model.admin.dtos.SensitiveDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.model.wemedia.pojos.WmSensitive;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.spring.web.json.Json;

import java.util.List;

@FeignClient("leadnews-wemedia")
public interface IWemediaClient {

    /**
     * 查询所有频道
     * @return
     */
    @GetMapping("/api/v1/channel/list")
    public ResponseResult getChannels();

    /**
     * 查询频道列表
     * @param channelDto 查询条件
     * @return
     */
    @PostMapping("/api/v1/channel/list")
    public ResponseResult list(@RequestBody ChannelDto channelDto);

    /**
     * 根据id删除
     * @param id id
     * @return
     */
    @GetMapping("/api/v1/channel/del/{id}")
    public ResponseResult delete(@PathVariable Integer id);

    /**
     * 保存
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/channel/update")
    public ResponseResult update(@RequestBody WmChannel wmChannel);


    /**
     * 保存
     * @param wmChannel
     * @return
     */
    @PostMapping("/api/v1/channel/save")
    public  ResponseResult  save(@RequestBody WmChannel wmChannel);


    /**
     * 查询敏感词列表
     * @param sensitiveDto 查询条件
     * @return
     */
    @PostMapping("/api/v1/sensitive/list")
    public ResponseResult list(@RequestBody SensitiveDto sensitiveDto);

    /**
     * 查询敏感词列表
     * @param id id
     * @return
     */
    @DeleteMapping("/api/v1/sensitive/del/{id}")
    public ResponseResult deleteById(@PathVariable Integer id);


    /**
     * 保存
     * @param wmSensitive
     * @return
     */
    @PostMapping("/api/v1/sensitive/save")
    public ResponseResult save(@RequestBody WmSensitive wmSensitive);

    /**
     * 保存
     * @param wmSensitive
     * @return
     */
    @PutMapping("/api/v1/sensitive/update")
    public ResponseResult update(@RequestBody WmSensitive wmSensitive);


    /**
     * 查询所有敏感词
     * @return
     */
    @GetMapping(value = "/api/v1/sensitive/findAll")
    public ResponseResult findAll();
}
